<?php


namespace app\index\model;


use think\Model;

class OrderHistory extends Model
{
    public static function getOrderHistoryById($id){
        $OrderHistoryClass=new self();
        $order_history=$OrderHistoryClass
            ->alias('oh')
            ->join('__USER__ u','oh.operator=u.id','left')
            ->where('oh.order_id',$id)
            ->where('oh.del_flag',0)
            ->field('IFNULL(u.user_name,"") user_name,oh.operator,oh.operational,oh.create_time')
            ->select()->toArray();
        return $order_history;
    }
}